const path = require('path')
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
const webpack = require('webpack')
function resolve(dir) {
    return path.join(__dirname, dir)
}
module.exports = {
    publicPath: './',

    devServer: {
        disableHostCheck: true
    },
    css: {
        sourceMap: true
    },
    chainWebpack: (config) => {
        config.resolve.alias
            .set('@$', resolve('src'))
            .set('@api', resolve('src/api'))
            .set('@assets', resolve('src/assets'))
            .set('@components', resolve('src/components'))
            .set('@views', resolve('src/views'))
            .set('@router', resolve('src/router'))
            .set('@store', resolve('src/store'))
            .set('@utils', resolve('src/utils'))
    },
    configureWebpack: {
        plugins: [
            // new BundleAnalyzerPlugin(),
            new webpack.IgnorePlugin(/\.\/locale/, /moment/)
        ],
        externals: {
        }
    }
}
